package java_DesignPattern.BehavioralPattern.CommandPattern;

import java.util.HashMap;
import java.util.Map;

/**
 * 订单类
 */
public class Order {

    //桌号
    private int desktopId;
    //餐品
    private Map<String, Integer> food = new HashMap<>();

    public void setDesktopId(int desktopId) {
        this.desktopId = desktopId;
    }

    public void setFood(Map<String, Integer> map) {
        this.food = map;
    }

    public int getDesktopId() {
        return desktopId;
    }

    public Map<String, Integer> getFood() {
        return food;
    }

    //在订单中添加餐品
    public void addFood(String foodName, int number) {
        this.food.put(foodName,number);
    }
}
